package tech.aistar.corejava.day17;

/**
 * Created by 豆梦寒 on 2019/8/6.
 */
public enum Season {
    SPRING("春") {
        @Override
        public Season next() {
            return SUMMER;
        }
    },
    SUMMER("夏") {
        @Override
        public Season next() {
            return AUTUMN;
        }
    },
    AUTUMN("秋") {
        @Override
        public Season next() {
            return WINTER;
        }
    },
    WINTER("冬") {
        @Override
        public Season next() {
            return SPRING;
        }
    };

    public String sign;

    Season(String sign) {
        this.sign = sign;
    }

    public String getSign() {
        return sign;
    }
    //抽象方法 - 但是每个枚举常量都要实现这个方法
    public abstract Season next();
}
